package com.sgolub.commanndsonline.service.sec;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sgolub.commanndsonline.dao.sec.SecUserDAO;
import com.sgolub.commanndsonline.domain.sec.SecUser;

@Service
public class SecUserServiceImpl implements SecUserService {

	@Autowired
	private SecUserDAO secUserDAO;
	



	@Transactional
	public SecUser get(Integer id) {
		return secUserDAO.get(id);
	}

    @Transactional
	public void add(SecUser secUser) {
    	secUserDAO.add(secUser);

	}

    @Transactional
	public void update(SecUser secUser) {
    	secUserDAO.update(secUser);
	}

    @Transactional
	public void remove(Integer id) {
    	secUserDAO.remove(id);
	}
    
    @Transactional
    public SecUser	getByName(String name){
    	return secUserDAO.getByName(name);
    }

    @Transactional
	public List<SecUser> list() {
		return secUserDAO.list();
	}

    @Transactional
    public List<SecUser> listManagers(){
    	return secUserDAO.listManagers();
    }
}
